package com.cskaoyan.market.admin.service.impl;

import com.cskaoyan.market.admin.service.MarketFeedbackService;
import com.cskaoyan.market.db.domain.MarketFeedback;
import com.cskaoyan.market.db.domain.MarketFeedbackExample;
import com.cskaoyan.market.db.mapper.MarketFeedbackMapper;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author yuanixn2158@163.com
 * @since 2023/05/09 11:09
 */
@Service
public class MarketFeedbackServiceImpl implements MarketFeedbackService {
    @Autowired
    private MarketFeedbackMapper marketFeedbackMapper;
    @Override
    public List<MarketFeedback> getFeedbackList(Integer page, Integer limit, String sort, String order) {
        MarketFeedbackExample marketFeedbackExample = new MarketFeedbackExample();
        marketFeedbackExample.orderBy(sort+" "+order);
        PageHelper.startPage(page,limit);
        List<MarketFeedback> marketFeedbackList=marketFeedbackMapper.selectByExample(marketFeedbackExample);
        
        
        return marketFeedbackList;
    }
}
